package cn.com.cifi.mars.constant;

import cn.com.cifi.mars.util.StrUtils;

/**
* @Description:  版本阶段枚举
* @Author: wy
* @Date:
*/

public enum VersionTypeEunm {

    WARPLAN("strategy","战规版"),
    GETPRICE("pricing","大定价版"), 
    DYNAMIC("dynamic","动态版"),
    BUDGET("budget","预算版"),
    PERMIT("permit","工规证版"),
    PRESURVEY("presurvey","预测版"),
    ACTUALSURVEY("actualsurvey","实测版"),
    //投资回款分析表使用
    ABILITY("ability","能力版"),
    //投资版-> 提交审批使用
    INVESTMENT("investment","投资版"),
    GROUP("group","集团审批版"),
    UN_GROUP("un_group","非集团审批版"),

    ;
	
    private String key;
    private String value;

    VersionTypeEunm(String key,String value) {
        this.key = key;
        this.value = value;
    }
    
    
    public static String getValueByKey(String key){
    	if(StrUtils.isNotEmpty(key)) {
    		 for(VersionTypeEunm versionTypeEunm:VersionTypeEunm.values()){
    	            if(key.equals(versionTypeEunm.getKey())){
    	                return versionTypeEunm.getValue();
    	            }
    	        }
    	}
        return  null;
    }

    public static String getKey(String key){
        for(VersionTypeEunm versionTypeEunm:VersionTypeEunm.values()){
            if(key.equals(versionTypeEunm.getValue())){
                return versionTypeEunm.getKey();
            }
        }
        return  null;
    }


    /**
     * @return the key
     */
    public String getKey() {
        return key;
    }


    /**
     * @return the value
     */
    public String getValue() {
        return value;
    }


}
